package org.devcp.tp.common.event;

import java.io.Serializable;

import org.devcp.tp.common.event.listner.SysEventListener;

/**
 * 系统事件注册器，用于封装事件与监听器的对应关系，并存放到缓存服务器的注册表中
 * @author Administrator
 *
 */
public class SysEventRegister implements Serializable{

	/**用于区分不同注册器的id*/
	private String id;
	/**
	 * 事件对象
	 */
	private SysEvent event;
	/**
	 * 监听器对象
	 */
	private SysEventListener listener;
	public SysEventRegister(){}
	
	public SysEventRegister(String id,SysEvent event,SysEventListener listener){
		this.event = event;
		this.listener = listener;
		this.id = id;
	}
	public SysEventRegister(SysEvent event,SysEventListener listener){
		this.event = event;
		this.listener = listener;
	}
	
	public SysEvent getEvent() {
		return event;
	}
	public void setEvent(SysEvent event) {
		this.event = event;
	}
	public SysEventListener getListener() {
		return listener;
	}
	public void setListener(SysEventListener listener) {
		this.listener = listener;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
}
